package com.nexmo.hangman.domain.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class GuessResultDto {

    private Boolean won;
    private Boolean lost;
    private List<Integer> guessedPositions;
    private Integer livesRemaining;
    private String hiddenWord;

    public Boolean getWon() {
        return won;
    }

    public void setWon(Boolean won) {
        this.won = won;
    }

    public Boolean getLost() {
        return lost;
    }

    public void setLost(Boolean lost) {
        this.lost = lost;
    }

    public List<Integer> getGuessedPositions() {
        return guessedPositions;
    }

    public void setGuessedPositions(List<Integer> guessedPositions) {
        this.guessedPositions = guessedPositions;
    }

    public Integer getLivesRemaining() {
        return livesRemaining;
    }

    public void setLivesRemaining(Integer livesRemaining) {
        this.livesRemaining = livesRemaining;
    }

    public void setHiddenWord(String hiddenWord) {
        this.hiddenWord = hiddenWord;
    }

    public String getHiddenWord() {
        return hiddenWord;
    }

    @Override
    public boolean equals(Object obj) {
        return EqualsBuilder.reflectionEquals(this, obj);
    }

    @Override
    public int hashCode() {
        return HashCodeBuilder.reflectionHashCode(this);
    }
}
